package ex_8_StringAndSyn;



public class Main {
    /**
     *
     *  String类型作为锁对象
     *
     */
    public static void main(String[] args) {
        ThreadA threadA = new ThreadA();
        threadA.setName("A");
        ThreadB threadB = new ThreadB();
        threadB.setName("B");
        threadA.start();
        threadB.start();
    }
}
